package com.zq.structure.decorator;

import java.util.Objects;

public class Guy implements Person {
    private Person person;

    public Guy(Person person) {
        this.person = Objects.requireNonNull(person);
    }

    @Override
    public void sayHello() {
        person.sayHello();
        System.out.println("How are you?");
    }

    @Override
    public void sayGoodbye() {
        System.out.println("Nice to meet you.");
        person.sayGoodbye();
    }

    public void laugh() {
        System.out.println("Hahaha.");
    }
}
